#include "btnfm.h"

SButtonForm::SButtonForm(QWidget* Parent, QString Caption) :
    SCustomBallForm(Parent, QPoint(2000, 0))
{
    FCaption = Caption;
    FGlyph = 0L;
//    if (Glyph)
//        FGlyph = new QImage(*Glyph);
//    else
//        FGlyph = 0L;
    Ball->setTitle(FCaption);
    setVisible(false);
}

SButtonForm::~SButtonForm()
{
    if (FGlyph)
        delete FGlyph;
}
//-------------------------------------------------------------------------

void SButtonForm::setColor(QColor color)
{
    if (FGlyph)
        Ball->setTitle(*FGlyph, color);
    else
        Ball->setTitle(FCaption, color);
}
//-------------------------------------------------------------------------

//void SButtonForm::mousePressEvent(QMouseEvent *mouse)
//{
//    emit clicked(this);
//    SCustomBallForm::mousePressEvent(mouse);
//}
